﻿@using Library
@using Library.Models
@using Ecommerce.Models
@using PagedList.Mvc
@model PagedList.IPagedList<ProductViewModel>

@{
    ViewBag.Title = Settings.GetSetting("CompanyName");
    ViewBag.Keywords = Settings.GetSetting("Keywords");
    ViewBag.Description = Settings.GetSetting("Description");
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section hreflangs
{
    <link rel="alternate" href="@Request.Url.Scheme://@Request.Url.Host/" hreflang="x-default" />
    @foreach (var hreflang in NOWCulture.Dictionary.Keys)
    {
        if (hreflang.Id != Settings.DefaultCulture)
        {
            <link rel="alternate" href="@Request.Url.Scheme://@Request.Url.Host/@hreflang" hreflang="@hreflang" />
        }
    }
}
@section styles
{
    @Styles.Render("~/Content/home")
}
@section scripts
{
    @(HttpContext.Current.IsDebuggingEnabled ? Scripts.Render("~/bundles/home") : Scripts.RenderFormat(@"<script src=""{0}"" async defer></script>", "~/bundles/home"))
}

<div class="categroup">
    <h2 class="catename"><a href="~/@ViewBag.ProductCategoryCulture.Url" title="@ViewBag.ProductCategoryCulture.WebTitle" class="tivi">@ViewBag.ProductCategoryCulture.Name</a></h2>
    <div class="brandlist hidden-xs">
        <h4><a href="tivi-samsung" class="">Samsung</a></h4>
        <h4><a href="tivi-samsung" class="">Samsung</a></h4>
        <h4><a href="tivi-samsung" class="">Samsung</a></h4>
    </div>
    <h2 class="viewall hidden-xs">
        <a href="~/@ViewBag.ProductCategoryCulture.Url" title="@ViewBag.ProductCategoryCulture.WebTitle" class="alltivi">Xem tất cả @ViewBag.ProductCategoryCulture.Name<span> ›</span></a>
    </h2>
    <div class="clearfix"></div>
    <div class="products container-fluid">
        @foreach (var productItem in Model)
        {
            @Html.Partial("../Shared/_ProductCell", productItem)
        }
    </div>
</div>
@Html.PagedListPager(Model, page => "?page=" + page)